﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using DAL;
public partial class ShowProjectImages : System.Web.UI.Page
{

    DAL.DataClassesDataContext lqDB = new DataClassesDataContext(System.Configuration.ConfigurationManager.ConnectionStrings["CMSConnectionString"].ToString());
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            databind();
        }
    }

    //显示对应项目的图片内容
    private void databind()
    {
        string id = Request.QueryString["id"].ToString();
        var query = from v in lqDB.ProjectImages
                    where v.Project_ID == id
                    select v;
        this.gvShowImages.DataSource = query;
        this.gvShowImages.DataBind();
    }
}